var mongoose = require('mongoose');

var wxPayNotifySchema = new mongoose.Schema({
    appid           : {type : String},
    bank_type       : {type : String},
    cash_fee        : {type : String},
    fee_type        : {type : String},
    is_subscribe    : {type : String},
    mch_id          : {type : String},
    nonce_str       : {type : String},
    openid          : {type : String},
    out_trade_no    : {type : String},
    result_code     : {type : String},
    return_code     : {type : String},
    sign            : {type : String},
    time_end        : {type : String},
    total_fee       : {type : String},
    trade_type      : {type : String},
    transaction_id  : {type : String},
    notify_flag     : {type : Boolean,default:false}
});

mongoose.model('WxPayNotify', wxPayNotifySchema);


/*
 { appid: 'wxef9f343d05b97ba0',
 bank_type: 'CCB_CREDIT',
 cash_fee: '1',
 fee_type: 'CNY',
 is_subscribe: 'Y',
 mch_id: '1247833301',
 nonce_str: 'WbC37zqxXUDqkCJ5lvadA6Jgc53KcWcA',
 openid: 'oA7dTs1Vs-I1rGJb39FSF_ue2s78',
 out_trade_no: '201509032464929567',
 result_code: 'SUCCESS',
 return_code: 'SUCCESS',
 sign: 'CCFF29F2D272C06B328B302138FC8CB1',
 time_end: '20150903161645',
 total_fee: '1',
 trade_type: 'JSAPI',
 transaction_id: '1003390747201509030779650339' }
 */